import {libraryList} from '../packages/lowCode/CisPageDesign/libraryList';

/**
 * @MARK 请和 /types/index.js保持数据一致
 * @TODO 由于无法再js中引用ts，同时打包入口文件无法修改成ts，配置项目前存有ts和js两个版本，请保持数据一致，如果后续找到解决方案再简化为一个
 */
// start
export const enum Categorize {
    "LAYOUT" = "layout",
    "BASIC" = "basic",
    "ADVANCED" = "advanced",
    "CHART" = "chart",
    "FORM" = "form",
}

export const enum CategorizeCn {
    "LAYOUT" = "布局组件",
    "BASIC" = "基础组件",
    "ADVANCED" = "高级组件",
    "CHART" = "图形组件",
    "FORM" = "表单组件",
}


/**
 * 组件库清单
 * @author GJS
 * @date 2023/04/25
 * @description 组件库与低代码库的区别就在于低代码库含有业务逻辑，组件库则是个纯净的组件
 */
export const enum LibComponent {
    "TABLE" = "CisTable",
    "FORM" = "CisForm",
    "FLEX_SCROLL" = "CisFlexScroll",
    "JSON_VIEWER" = "CisJsonViewer",
    "PREVIEW_WORD" = "CisWord",
    "PREVIEW_EXCEL" = "CisExcel",
    "PREVIEW_PDF" = "CisPdf",
    "Tree_INPUT" = "CisInputTree",
    "BUSINESS_FLOW" = "CisBusinessFlow",
}

/**
 * 组件库清单(中文)
 * @author GJS
 * @date 2023/04/25
 * @description 组件库与低代码库的区别就在于低代码库含有业务逻辑，组件库则是个纯净的组件
 */
export const enum LibComponentCn {
    "TABLE" = "表格",
    "FORM" = "表单",
    "FLEX_SCROLL" = "Flex布局中可滚动",
    "JSON_VIEWER" = "Json展示",
    "PREVIEW_WORD" = "Word预览",
    "PREVIEW_EXCEL" = "Excel预览",
    "PREVIEW_PDF" = "Pdf预览",
    "Tree_INPUT" = "选择树",
    "BUSINESS_FLOW" = "业务流程图",
}

/**
 * 低代码组件库类型清单
 * @author GJS
 * @date 2023/04/25
 */
export const enum ComponentType {
    "PAGE_DESIGN" = "pageDesign",
    "GRID" = "grid",
    "GRID_COL" = "gridCol",
    "FLEX" = "flex",
    "TAB" = "tab",
    "CARD" = "card",
    "TABLE" = "table",
    "FORM" = "form",
    "TEXT" = "text",
    "HTML" = "html",
    "BUTTON" = "button",
    "DIVIDER" = "divider",
    "TRANSFER" = "transfer",
    "INPUT" = "input",
    "TEXTAREA" = "textarea",
    "INPUT_NUMBER" = "inputNumber",
    "RADIO" = "radio",
    "CHECKBOX" = "checkbox",
    "SELECT" = "select",
    "TIME_PICK" = "timePick",
    "DATE_PICK" = "datePick",
    "DATE_TIME_PICK" = "dateTimePick",
    "SWITCH" = "switch",
    "RATE" = "rate",
    "COLOR_PICK" = "colorPick",
    "SLIDER" = "slider",
    "CASCADER" = "cascader",
    "TREE" = "tree",
    "TREE_SELECT" = "treeSelect",
    "TREE_INPUT" = "inputTree",
    "CUSTOM_TABLE" = "table",
    "DYNAMIC_FORM" = "form",
    "PICTURE" = "picture",
    "UPLOAD" = "upload",
    "RICH_EDITOR" = "richEditor",
    "CALENDAR" = "calendar",
    "CAROUSEL" = "carousel",
    "LINE_CHART" = "chartLine",
    "BAR_CHART" = "chartBar",
    "PIE_CHART" = "pieChart",
    "SCATTER_CHART" = "scatterChart",
    "GAUGE_CHART" = "gaugeChart",
    "PREVIEW_WORD" = "word",
    "PREVIEW_EXCEL" = "excel",
    "PREVIEW_PDF" = "pdf",
}

/**
 * 低代码组件库清单
 * @author GJS
 * @date 2023/04/25
 * @description 组件库与低代码库的区别就在于低代码库含有业务逻辑，组件库则是个纯净的组件
 */
export const enum Component {
    "PAGE_DESIGN" = "CisPageDesign",
    "GRID" = "CisGrid",
    "GRID_COL" = "elCol",
    "FLEX" = "DesignFlexLayout",
    "TAB" = "DesignTabLayout",
    "CARD" = "card",
    "TABLE" = "table",
    "FORM" = "form",
    "TEXT" = "text",
    "HTML" = "html",
    "BUTTON" = "DesignButton",
    "DIVIDER" = "divider",
    "TRANSFER" = "DesignTransfer",
    "INPUT" = "input",
    "TEXTAREA" = "textarea",
    "INPUT_NUMBER" = "inputNumber",
    "RADIO" = "DesignRadioS",
    "CHECKBOX" = "DesignCheckbox",
    "SELECT" = "DesignSelect",
    "TIME_PICK" = "TimePick",
    "DATE_PICK" = "DatePick",
    "DATE_TIME_PICK" = "DateTimePick",
    "SWITCH" = "switch",
    "RATE" = "rate",
    "COLOR_PICK" = "colorPick",
    "SLIDER" = "slider",
    "CASCADER" = "DesignCascader",
    "TREE" = "DesignTree",
    "TREE_SELECT" = "treeSelect",
    "TREE_INPUT" = "DesignInputTree",
    "CUSTOM_TABLE" = "DesignTable",
    "DYNAMIC_FORM" = "DesignForm",
    "PICTURE" = "picture",
    "UPLOAD" = "upload",
    "RICH_EDITOR" = "richEditor",
    "CALENDAR" = "calendar",
    "CAROUSEL" = "carousel",
    "LINE_CHART" = "DesignChartLine",
    "BAR_CHART" = "DesignChartBar",
    "PIE_CHART" = "pieChart",
    "SCATTER_CHART" = "scatterChart",
    "GAUGE_CHART" = "gaugeChart",
}

/**
 * 低代码组件库清单(中文)
 * @author GJS
 * @date 2023/04/25
 * @description 组件库与低代码库的区别就在于低代码库含有业务逻辑，组件库则是个纯净的组件
 */
export const enum ComponentCn {
    "PAGE_DESIGN" = "设计器",
    "GRID" = "栅格",
    "GRID_COL" = "栅格col",
    "FLEX" = "Flex布局",
    "TAB" = "标签页",
    "CARD" = "卡片",
    "TABLE" = "表格",
    "FORM" = "表单",
    "TEXT" = "静态文字",
    "HTML" = "HTML",
    "BUTTON" = "按钮",
    "DIVIDER" = "分割线",
    "TRANSFER" = "穿梭框",
    "INPUT" = "单行输入",
    "TEXTAREA" = "多行输入",
    "INPUT_NUMBER" = "计数器",
    "RADIO" = "单选项",
    "CHECKBOX" = "多选项",
    "SELECT" = "下拉选项",
    "TIME_PICK" = "时间范围",
    "DATE_PICK" = "日期",
    "DATE_TIME_PICK" = "日期范围",
    "SWITCH" = "开关",
    "RATE" = "评分",
    "COLOR_PICK" = "颜色选择器",
    "SLIDER" = "滑块",
    "CASCADER" = "级联选择器",
    "TREE" = "树形控件",
    "TREE_SELECT" = "下拉树",
    "TREE_INPUT" = "选择树",
    "CUSTOM_TABLE" = "高级表格",
    "DYNAMIC_FORM" = "动态表单",
    "PICTURE" = "图片",
    "UPLOAD" = "文件",
    "RICH_EDITOR" = "富文本",
    "CALENDAR" = "日历",
    "CAROUSEL" = "走马灯",
    "LINE_CHART" = "折线图",
    "BAR_CHART" = "柱状图",
    "PIE_CHART" = "饼图",
    "SCATTER_CHART" = "散点图",
    "GAUGE_CHART" = "仪表盘",
}

/**
 * echarts图表类型
 * @author GJS
 * @date 2023/04/25
 */
export const enum EchartsTypes {
    "BAR" = "bar",
    "LINE" = "line",
    "PIE" = "pie",
}

// end

export interface LibraryListItemProp {
    name: string
    hidden: boolean
}

export interface LibraryListItemType {
    name: string
    title: string
    type: string
    nodeKey?: string
    category: string
    categoryName: string
    props: LibraryListItemProp
    events: object
    service: object
    children?: any[]
}

/**
 * 公用icons类型
 * @param LAYOUT 布局
 * @param TABLE 表格、列表
 */
export enum icons {
    'LAYOUT' = 'icon-baocunbuju',
    'TABLE' = 'icon-biaoge'
}
